﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClassFactoryDemo
{
    class ClassFactory
    {
        public static Shape makeShape(string shapeName)
        {
            switch (shapeName)
            {
                case "Triangle":
                    return new TriAngle();
                case "Rectangle":
                    return new RectAngle();
                
            }
            return null;
        }
    }
}
